{include file="public/header296" /}
<div class="layui-form" style="padding-top: 10px;">
    <div class="layui-upload" id="upload-thumb">
        <label class="layui-form-label">头像</label>
        <div class="layui-upload-list">
            <img class="layui-upload-img" id="demo1" width="150" height="150" {notempty name="$item.avatar"}src="{$item.avatar}"{/notempty} >
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">昵称</label>
            <div class="layui-input-inline">
                <input type="text" value="{$item.nickname}" class="layui-input" style="border: none" />
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">手机号码</label>
            <div class="layui-input-inline">
                <input type="tel" value="{$item.mobile}" autocomplete="off" class="layui-input" style="border: none" />
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">类型</label>
        <div class="layui-input-block">
            <input type="checkbox" title="实名" lay-skin="primary" {if $item['type'] == 1} checked {else/} disabled {/if} />
            <input type="checkbox" title="技能" lay-skin="primary" {if $item['type'] == 2} checked {else/} disabled {/if} />
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">认证时间</label>
        <div class="layui-input-inline">
            <input type="text" value="{$item.create_time}" class="layui-input" style="border: none" />
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">审核时间</label>
        <div class="layui-input-inline">
            <input type="text" {notempty name="item.auth_time"}value="{$item.auth_time}"{/notempty} class="layui-input" style="border: none" />
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">最后更新</label>
        <div class="layui-input-inline">
            <input type="text" value="{$item.update_time}" class="layui-input" style="border: none" />
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">审核状态</label>
        <div class="layui-input-block">
            {if $item['status'] == 1}
                <input type="button" class="layui-btn layui-btn-primary" value="已认证" />
            {elseif $item['status'] == 2}
                <input type="button" class="layui-btn layui-btn-danger" value="已拒绝" />
            {else/}
                <input type="button" value="审核中" class="layui-btn" />
            {/if}
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">认证字段</label>
        <div class="layui-input-block">
            <input type="text" value="{$item.auth_field}" class="layui-input" style="border: none" />
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">认证图片</label>
        <div class="layui-upload-list">
            {if $item['auth_images'] != ''}
                {foreach $item['auth_images'] as $key=>$image}
                    <img class="layui-upload-img" id="auth_image_id_{$key}" height="100" layer-src="{$image}" src="{$image}" />
                {/foreach}
            {/if}
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">审核</label>
        <div class="layui-input-block">
            <input type="radio" name="status" value="1" title="通过" {eq name="item.status" value="1"}checked {/eq} />
            <input type="radio" name="status" value="2" title="拒绝" {eq name="item.status" value="2"}checked {/eq} />
        </div>
    </div>
    <div class="layui-form-item layui-hide">
        <input type="hidden" name="id" value="{$item.id}" />
        <input type="hidden" name="type" value="{$item.type}" />
        <input type="button" lay-submit lay-filter="Lay-app-form-edit" id="Lay-app-form-edit" value="编辑">
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">备注</label>
        <div class="layui-input-block">
            <input type="text" name="remarks" value="{$item.remarks}" class="layui-input" style="width: 95%" />
            <p>如果审核不通过请输入原因</p>
        </div>
    </div>
</div>
<script>
layui.use(['layer', 'form'], function(){
    var $ = layui.$
            ,form = layui.form;

    var area = [];
    if (window.screen.width > 1680 && window.screen.width <= 1920) {
        area = ['80%', '90%']
    } else if (window.screen.width > 1600 && window.screen.width <= 1680) {
        area = ['80%', '90%']
    } else if (window.screen.width > 1366 && window.screen.width <= 1600) {
        area = ['80%', '90%']
    } else if (window.screen.width <= 1366) {
        area = ['80%', '90%']
    }
    $(document).on('click', '.layui-upload-img', function(obj){
        console.log(obj);
        layer.open({
            type: 1,
            title: false,
            closeBtn: 0,
            shadeClose: true,
            area: area ,
            content: "<img src=" + $(this).attr('src') + " />"
        });
    })
})
</script>
{include file="public/footer" /}